package com.tianyuan.dplrf.ui.utiils;

import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.util.FloatProperty;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;

import androidx.annotation.NonNull;

import com.tianyuan.dplrf.R;

public class Uiutils {
    /**
     * 获取状态栏高度
     *
     * @param context context
     * @return 状态栏高度
     */
    public static int getStatusBarHeight(Context context) {
        // 获得状态栏高度
        int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
        return context.getResources().getDimensionPixelSize(resourceId);
    }

    public static void showRightInAnim(View v,Context appcontext){
        v.setAnimation(AnimationUtils.loadAnimation(appcontext, R.anim.right_in_activity));
    }
    public static void showRightOutAnim(View v,Context appcontext){
        v.setAnimation(AnimationUtils.loadAnimation(appcontext, R.anim.left_out_activity));
    }
}
